import request from "@/utils/request";

export function getArticle(params) {
    return request({
        url:process.env.VUE_APP_WEB_API +'/blog/getBlog',
        method:"post",
        data:params,
        // headers: {'X-Requested-With': 'application/json'},
        // transformRequest: [function (data, headers) {
        //     // 对 data 进行任意转换处理
        //     return data;
        // }],

    })
}
//获取文章
export function getArticlePage( currentPage) {
    return request({
        url: process.env.VUE_APP_WEB_API +'/blog/getBlog/'+ currentPage,
        method:"post",

    })
}
//根据id删除一条博文
export function delArticleById(aid) {
    return request({
        url:process.env.VUE_APP_WEB_API +'/blog/del/'+aid,
        method:"post",

    })
}
//查询
export function queryArticle(params) {
    return request({
        url:process.env.VUE_APP_WEB_API +'/blog/query',
        method:"post",
        data:params

    })
}

